package cz.cuni.amis.episodic.bayes.experiment;

import java.io.File;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.stream.Collectors;

import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
import org.apache.commons.math.stat.ranking.NaturalRanking;
import org.jfree.data.xy.XYDataset;
import org.jfree.data.xy.YIntervalSeries;
import org.jfree.data.xy.YIntervalSeriesCollection;

import com.beust.jcommander.converters.IntegerConverter;

import cz.cuni.amis.episodic.bayes.memories.IntervalSurpriseMemoryCreator;
import cz.cuni.amis.episodic.bayes.memories.MemoryCreator;
import cz.cuni.amis.episodic.bayes.memories.MinimizeKLMemoryCreator;
import cz.cuni.amis.episodic.bayes.utils.DeviationGraph;
import cz.cuni.amis.episodic.bayes.utils.chart.AgregateGraphDevice;
import cz.cuni.amis.episodic.bayes.utils.chart.GraphPaintingDevice;
import cz.cuni.amis.episodic.bayes.utils.chart.PdfGraphDevice;
import cz.cuni.amis.episodic.bayes.utils.chart.PngGraphDevice;
import cz.cuni.amis.episodic.lisp.netcreators.AHMEMCreator;
import cz.cuni.amis.episodic.lisp.netcreators.CHMMCreator;
import cz.cuni.amis.episodic.lisp.netcreators.TraceModificationStrategy;
import cz.cuni.amis.episodic.lisp.netcreators.UpperTraceAndObservationStrategy;

/**
 * ICCM 2013 experiment.
 * 
 * @author ik
 */
public class Experiment_4c_monroe_effectOfTrainingDataOverlap extends Experiment_4c_monroe_effectOfTrainingData {

	public static String expsRootFolder = "target/experiments/4_monroe_effectOfTrainingDataOverlap";
	

	public Experiment_4c_monroe_effectOfTrainingDataOverlap(String expName, String rootFolder, String dataset) {
		super(expName, rootFolder, dataset);
		
	}



	public static void main(String[] args) throws Exception {
		int numberOfDaysInOneBatch = 25;

		int testingData = 25;
		
		createTrainingDataInfluenceGraph(expsRootFolder);

		for (int i = 1; i < 4; i++) {
			int trainingDataNum = i * numberOfDaysInOneBatch;

			Experiment e = new Experiment_4c_monroe_effectOfTrainingData(
					"seen_split-" + trainingDataNum, expsRootFolder, "../datasets/4b_monroe/monroe-small.txt");
				e.setTestingDataRange(new int[] { 0, testingData });
			//e.setTrainingDataRange(new int[] { testingData,
			//		testingData + trainingDataNum });
			 e.setTrainingDataRange(new int[] {0, trainingDataNum});
			e.perform();
		}
	}

}
